package com.github.binarywang.demo.wx.mp.handler.multi;

import com.github.binarywang.demo.wx.mp.config.multiconfig.WxConfig;
import com.github.binarywang.demo.wx.mp.handler.MsgHandler;
import me.chanjar.weixin.common.session.WxSessionManager;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

@Component
public class MultiMsgHandler extends MsgHandler {

  private WxConfig wxConfig;

  @Resource
  private ApplicationContext applicationContext;

    @Override
    protected WxConfig getWxConfig() {
        return this.wxConfig;
    }

    public void setWxConfig(WxConfig wxConfig) {
    this.wxConfig = wxConfig;
  }

    @Override
    public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage, Map<String, Object> context, WxMpService wxMpService, WxSessionManager sessionManager) {

        /**
         * 业务逻辑实现
         */

        return null;
    }
}
